package com.hoshiicloud.user.vo.customer;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Map;

/**
* <p>
* 购物车购物信息记录表
* </p>
*
* @author Mr.wu
* @since 2019-05-21
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("cart")
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="CartVO对象", description="购物车购物信息记录表")
public class CartVO extends Model<CartVO> {


    @ApiModelProperty(value = "购物车ID")
    @TableId(value = "rec_id", type = IdType.AUTO)
    private Long recId;

    @ApiModelProperty(value = "平台ID")
    @TableField("platform_id")
    private Long platformId;

    @ApiModelProperty(value = "门店ID")
    @TableField("store_id")
    private Long storeId;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "来源平台或门店spu_id")
    @TableField("spu_id")
    private Long spuId;

    @ApiModelProperty(value = "来源平台或门店sku_id")
    @TableField("sku_id")
    private Long skuId;

    @ApiModelProperty(value = "商品的名称")
    @TableField("spu_title")
    private String spuTitle;

    @ApiModelProperty(value = "sku组合标题")
    @TableField("sku_title")
    private String skuTitle;

    @ApiModelProperty(value = "属性json对象")
    @TableField("spu_extend_prop")
    private String spuExtendProp;

    @ApiModelProperty(value = "规格json对象")
    @TableField("spu_extend_spec")
    private Map<String,Object> spuExtendSpec;

    @ApiModelProperty(value = "商品售价")
    @TableField("goods_price")
    private BigDecimal goodsPrice;

    @ApiModelProperty(value = "sku属性json对象")
    @TableField("sku_extend_prop")
    private String skuExtendProp;

    @ApiModelProperty(value = "商品的购买数量，在购物车时，实际库存不减少")
    @TableField("goods_quantity")
    private Long goodsQuantity;

    @ApiModelProperty(value = "ctivity 的id")
    @TableField("activity_id")
    private Integer activityId;

    @ApiModelProperty(value = "状态   0-失效 1-有效")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "是否已经屏蔽或删除")
    @TableField("deleted")
    private Integer deleted;

    @ApiModelProperty(value = "建立时间")
    @TableField("createdtime")
    private LocalDateTime createdtime;

    @ApiModelProperty(value = "制单人")
    @TableField("createdby")
    private String createdby;

    @ApiModelProperty(value = "更新时间")
    @TableField("updatedtime")
    private LocalDateTime updatedtime;

    @ApiModelProperty(value = "更新人")
    @TableField("updatedby")
    private String updatedby;

    @ApiModelProperty(value = "商品图片")
    @TableField("sku_image")
    private String skuImage;

}
